package com.web.controller.schoolManagement;

import com.common.apiresult.CommonResult;
import com.service.serviceInterface.WorkInfoService;
import com.system.entity.WorkInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author liuxuhuang
 * @date 2023年04月04日 11:41
 * @desc 工作人员控制器
 */
@RestController
@Api(value = "worker", tags = "工作人员控制器")
@RequestMapping(value = "/schoolManagement/worker")
@Slf4j
public class WorkerController {
    @Resource
    private WorkInfoService workInfoService;

    @GetMapping
    @ApiOperation(value = "获取工作人员信息")
    public CommonResult get() {
        List<WorkInfo> list = workInfoService.list();
        return CommonResult.success(list);
    }

    @PutMapping
    @ApiOperation(value = "修改工作人员信息")
    public CommonResult update() {
        return CommonResult.success();
    }

    @DeleteMapping
    @ApiOperation(value = "删除工作人员")
    public CommonResult delete() {
        return CommonResult.success();
    }

    @PostMapping
    @ApiOperation(value = "新增工作人员")
    public CommonResult add() {
        return CommonResult.success();
    }
}
